<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link href="style.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="check_form.js"></script>
</head>
<body>
	
<?php

/* $type = $_REQUEST['type']; */
$name = $_REQUEST['name'];
$description = $_REQUEST['description'];

// Display confirmation
// ************************** query DB to add entry
if ($name) {
	$orig_method = $_REQUEST['orig_method'];
	$new_method = $_REQUEST['new_method'];
	
	echo "<h2>Success! You've added a new method fragment:</h2>";
	echo "<b>Method Fragment Name</b>: $name<br/>";
	echo "<b>Description</b>: $description<br/>";
	echo "<b>Originating Methodology</b>: ";
	if ($new_method) {
		echo "$new_method<br/>";
	} else {
		echo "$orig_method<br/>";
	}
		echo "<hr/>";
}

?>

<div id="wrapper">
<!-- 	Method Fragment -->
	<div class="form_heading">Add a Method Fragment</div>
	
	<form name="add_mf" action="add_mf.php" method="post" onsubmit="return check_mf(this)">
		Method Fragment Name:<br/>
		<input type="text" size="50" name="name"/><br/>
		Description:<br/>
		<textarea cols="50" rows="5" name="description"></textarea><br/>
		Originating Methodology:
		<select name="orig_method">
			<!-- Query DB here to grab all methodologies to list in drop down menu	 -->
			<option>Agile</option>
			<option>Some Methodology</option>
			<option>Example Methodology</option>
			<option>Other</option>
		</select><br/>
		If other, name this methodology (otherwise leave blank): <input type="text" size="40" name="new_method"/><br/><br/>
		<input type="submit" value="Submit"/>
	</form>
	<br/>
	<a href="index.php">Back to Main</a>
</div>	

</body>
</html>